
use Data/Individual_withsolar.dta, replace
	
	
	

	gen peersolar = cum - (has_solar/1000)

  
  
  
	label variable peersolar "Peer Solar Rooftops (000s)"
	label variable has_solar "Adopted Solar"
  
  
	label variable median_income_interp "Median Income (AUD 000s)"
	label variable median_mortgage_interp "Median Mortgage Payment (AUD 000s)"
	label variable median_rent_interp "Median Rental Payment (AUD 000s)" 
	label variable PBachelor_interp "Proportion Bachelor's Degree"
	label variable PRented_interp "Proportion Rental Properties"
	label variable median_rooms_interp "Median House Size"
	label variable PFullTime_interp "Proportion Employed Full Time"
	label variable median_age_interp "Median Age"
  
	xtset postcode
  


 
 ** WITHOUT SOLAR HOUSEHOLDS 
 
  	xi: xtivreg2 green_p peersolar i.quarter if ever_solar==0  & roofrelativeIV<., fe cluster(postcode) 

	
	quietly summ green_plan if e(sample)
    local meandepvar=round(`r(mean)',.001)

outreg2 using Analysis/FE_HH_nosolar, bdec(3) label ctitle("FE")   ///
keep(*solar*  ) addtext(Postcode FE, Yes, Year-Quarter FE, Yes, Mean dep var, 0`meandepvar') ///
tex(fragment pretty) nonotes replace
 

 
 
 
	xi: xtivreg2 green_p peersolar i.quarter median_income_interp median_mortgage_interp PBachelor_interp PFullTime_interp  if ever_solar==0	& roofrelativeIV<. , fe cluster(postcode) 

	
	quietly summ green_plan  if e(sample)
    local meandepvar=round(`r(mean)',.001)

outreg2 using Analysis/FE_HH_nosolar, bdec(3) label ctitle("FE")   ///
keep(*solar*  median_* P*) addtext(Postcode FE, Yes, Year-Quarter FE, Yes, Mean dep var, 0`meandepvar') ///
tex(fragment pretty) nonotes append
 



 
	xi: xtivreg2 green_p (peersolar  = roofrelativeIV)  i.quarter  if ever_solar==0 , fe cluster(postcode) ffirst 

	
	quietly summ green_plan if e(sample)
    local meandepvar=round(`r(mean)',.001)

outreg2 using Analysis/FE_HH_nosolar, bdec(3) label ctitle("IV")  addstat(CDW F-test, e(widstat)) ///
keep(*solar*  ) addtext(Postcode FE, Yes, Year-Quarter FE, Yes, Mean dep var, 0`meandepvar') ///
tex(fragment pretty) nonotes append
 
 
 
 
 
	
	xi: xtivreg2 green_p (peersolar  = roofrelativeIV)  median_income_interp median_mortgage_interp PBachelor_interp PFullTime_interp   i.quarter if ever_solar==0, fe cluster(postcode) ffirst 
	
	
	
	quietly summ green_plan if e(sample)
    local meandepvar=round(`r(mean)',.001)


outreg2 using Analysis/FE_HH_nosolar, bdec(3) label ctitle("IV")  addstat(CDW F-test, e(widstat)) ///
keep(*solar*  median_* P*) addtext(Postcode FE, Yes, Year-Quarter FE, Yes, Mean dep var, 0`meandepvar') ///
tex(fragment pretty) nonotes append
 
	
 
 
 
 
 
 
 
